<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 打开调试
			// uni.setEnableDebug({
			//     enableDebug: true
			// })
		},
		onShow: function() {
			uni.getStorage({
				key: "globalData",
				success: (res) => {
					this.globalData = res.data;
				},
				fail: (res) => {}
			})
			console.log('App Show')

		},
		globalData: {
			deviceId: "",
			bluetoothList: [], //当前蓝牙设备列表，用于显示列表，防止ios重新搜索显示
			iSAllowDcovere: true, //是否允许搜索，防止重复搜索
			onValueFunStr: "getCardType",//监听完成后需要执行的函数回调
			currentcardData: {}, //当前卡对象数据
			currentCommandsIndex: 0, //当前指令的索引
			cardCommands: ["121200000000000000000000001C010C049782"], //指令命令
			returnCommands: [], //根据指令返回的报文信息
			writeCardCardData: {},
			readCardType: "",
			isWriting: false,
			writePage:"getMeterData"
		},
		onHide: function() {
			uni.removeStorage({
			    key: 'globalData',
			    success: function (res) {
			        console.log('success');
			    }
			});

		}
	}
</script>

<style>


</style>
